new Vue({
  el: '#test',
  data: {
    text :'欢迎浏览',
    nowIndex: 0,
    navdatas: ['Tab One', 'Tab Two', 'Tab Three', 'Tab four', 'Tab Five'],
    navIndex: 0
  },
  methods: {
    getIndex(index){
      this.navIndex = index;
    }
  },
  mounted() {
    let _this = this;
    let timer = setInterval(function(){
      _this.nowIndex++;
    switch(_this.nowIndex){
        case 1:
          _this.text = '守候的文章';
        break;
        case 2:
          _this.text = '愿您浏览愉快';
        break;
        case 3:
          _this.text = '学到老用到老';
        break

      }
      if(_this.nowIndex > 3){
        setTimeout(()=>{
          clearInterval(timer);
        }, 2000)
      }
    }, 2000)
  }
})
